package com.yay.warehouse.service;

import java.util.Locale;

import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Typeface;

import com.yay.warehouse.IKeys;


/**
 * Get Started!
 * @author yakovlev.yuriy@gmail.com
 * @author Dmitry Makeev
 */
public class L10N {
	public static boolean debug = false;
	public static Typeface font;
	

	public static void init(Resources res) {
		Configuration conf = res.getConfiguration();
	    if(debug) { 
			conf.locale = new Locale(IKeys.UA);
		    res.updateConfiguration(conf, res.getDisplayMetrics());
	    }
	    initFont(res);
	}
	
	
	// PRIVATE METHODS
	
	private static void initFont(Resources res) {
		if(font == null) {
			font = Typeface.createFromAsset(res.getAssets(), IKeys.FONT);
		}
	}
	
}
